<extend name="Layout/ins_page" />
<block name="content">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <?php if (!session_id()) session_start();date_default_timezone_set('PRC'); ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>授权列表</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <link href="/sap/demo.css" rel="stylesheet" type="text/css" />
        <script src="/sap/scripts/boot.js" type="text/javascript"></script>
    </head>
    <body>

    <form>

        <div>
        员工：
        <input id="q_request_man" name="q_request_man" class="mini-combobox" style="width:300px;" textField="name" valueField="emp_no" emptyText="选择用户..."  url="/Wkorder/getUserlist" value=""  allowInput="true" showNullItem="true" nullItemText="选择用户..."/>
    </div>

        <div>&nbsp;</div>

        <div>
            <span>工单创建时间 </span>
        <span>开始日期：</span><input id="start" class="mini-datepicker" format="yyyy-MM-dd " showTime="true" valueType='string'
               value="<?php echo date('Y-m-d', time() - 86400 * 7) ?>"/> <span>结束日期：</span><input id="end" class="mini-datepicker" format="yyyy-MM-dd " showTime="true" valueType='string'
               value="<?php echo date('Y-m-d ') ?>"/>
    </div>

        <div>&nbsp;</div>

        <div>
            <a class="mini-button" onclick="export_order" enabled="" id='exportBtn' style="">&nbsp;&nbsp;导出&nbsp;&nbsp;</a>
        </div>

    </form>

    </body>
    <script type="text/javascript">

        function export_order() {

            var qRequestMan = mini.get("q_request_man").getValue();
            if(qRequestMan==''){
                mini.alert('请选择员工');
                return ;
            }

            var startDate = mini.get('start').getValue();
            var endDate = mini.get('end').getValue();

            var f=document.createElement("form");
            f.action="/wkorder/doexportdporder20171120";
            f.method="post";
            f.innerHTML="<input type='hidden' name='startDate' value='"+startDate+"'/>"+
                "<input type='hidden' name='endDate' value='"+endDate+"'/>"+
                "<input type='hidden' name='qRequestMan' value='"+qRequestMan+"'/>"
            ;
            document.body.appendChild(f);
            f.submit()

        }

    </script>

    </html>
</block>